<template>
  <div class="controller-bar ">
    <span style="color:#ffffff80">可选参数说明：summary 代码描述，name 接口名称，url 链接名称，method 方法名称</span>
  </div>
  <TemplateEditor :value="code" @save="saveCode" style="height: 100vh;background-color: #282c34;"/>
</template>
<script lang="ts">
import { defineComponent, ref } from "vue";
import TemplateEditor from "@/components/TemplateEditor.vue";
import { FileAddOutlined } from "@ant-design/icons-vue";
import { activeCode } from "@/settings/local";
import { message } from 'ant-design-vue';

export default defineComponent({
  components: {
    TemplateEditor,
    FileAddOutlined,
  },
  setup() {
    const code = ref("");


    function saveCode(content: string) {
      activeCode.value = content
      message.success("保存成功!!")
    }

    return {
      code,
      saveCode,
      activeCode,
    };
  },
});
</script>
<style lang="less" scoped>
.controller-bar {
  height: 32px;
  background-color: #3c3f41;
  border-bottom: 1px solid #323232;
  line-height: 32px;
  padding-left: 10px;
  position: absolute;
  bottom: 0;
}

:deep(.ant-list-bordered.ant-list-sm .ant-list-item) {
  color: #fff;
  cursor: pointer;
}

:deep(.ant-typography) {
  color: #fff;
}
</style>
